﻿/////////////////////////////////////////////////////////////////////////////////////////////
// <copyright file="CleanupScripts.cs" company="Microsoft Corporation">
//     Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
/////////////////////////////////////////////////////////////////////////////////////////////

namespace Microsoft.LiveAtEdu.Samples.Powershell.Cleanup
{
    /// <summary>
    /// Script names used for Cleanup activities.
    /// </summary>
    /// <remarks>
    /// This is used specifically for the LiveAtEdu Demo.
    /// </remarks>
    public static class CleanupScripts
    {
        /// <summary>
        /// Name of script to remove the DDL.
        /// </summary>
        public const string RemoveDdlScript = "Remove-DynamicDistributionGroup -Identity:{0} -Confirm:$false";

        /// <summary>
        /// Name of script to remove proxy email address.
        /// </summary>
        public const string RemoveProxyAddressScript = @"$user = '{0}'
                    $mailbox = Get-Mailbox -identity $user
                    $mailbox.EmailAddresses.Remove('{1}')
                    set-mailbox -identity $user -EmailAddresses $mailbox.EmailAddresses";

        /// <summary>
        /// Name of script to remove user from RejectMessageFrom list.
        /// </summary>
        public const string RemoveUserFromRejectMessageFrom = @"$user = '{0}'
                $mailbox = Get-Mailbox -identity $user
                $mailbox.RejectMessagesFrom.RemoveAt(0)
                set-mailbox -identity $user -RejectMessagesFrom $mailbox.RejectMessagesFrom";
    }
}
